﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Firefly.Editor;
using System.Collections;
using System.Drawing;

namespace Firefly.Controls {
    public class GridView : UserControl {

        public float Zoom { get; set; }

        public int CellSize { get; set; }

        private Grid[] gridSet;

        public GridView() {
            gridSet = new Grid[256];
            CellSize = 50;
        }

        protected override void OnPaint(PaintEventArgs e) {
            Graphics g = e.Graphics;
            for (int x = 0; x < 256; x++) {
                g.DrawLine(new Pen(new SolidBrush(Color.Black), 1), new Point(x * (int)CellSize, 0),
                    new Point(x * (int)CellSize, (int)CellSize * 256));
            }

            for (int y = 0; y < 256; y++) {
                g.DrawLine(new Pen(new SolidBrush(Color.Black), 1), new Point(0, y * (int)CellSize),
                    new Point(256 * (int)CellSize, (int)CellSize * y));
            }
            base.OnPaint(e);
        }
    }
}
